﻿using SqlSugar;
using System;
using System.Text;
using System.Collections.Generic;
using System.Data;
namespace GKQC.DbHelper.DbModels
{
	//OQC检测单外观AQL
	[SugarTable("t_oqc_dtl")]
	public class OqcDtlModel
	{
		public OqcDtlModel()
        {
			this.n = string.Empty;
			this.c = string.Empty;
			this.d = string.Empty;
			this.Item = string.Empty;
		}
		/// <summary>
		/// 单头Id
		/// </summary>	
		[SugarColumn(IsPrimaryKey = true)]
		public long HeadId { get; set; }
		/// <summary>
		/// 项次
		/// </summary>		
		[SugarColumn(IsPrimaryKey = true)]
		public int SNo { get; set; }
		/// <summary>
		/// 抽样数量
		/// </summary>		
		public string n { get; set; }
		/// <summary>
		/// 合格数量
		/// </summary>		
		public string c { get; set; }
		/// <summary>
		/// 不合格数量
		/// </summary>		
		public string d { get; set; }

		[SugarColumn(IsIgnore = true)]
		public string Item { get; set; }

		public string GetItem(int i)
        {
			string item = string.Empty;
			switch (i)
			{
				case 0:
					item = "外觀";
					break;
				case 1:
					item = "电气特性";
					break;
				case 2:
					item = "腳  距";
					break;
				case 3:
					item = "可焊性";
					break;
				case 4:
					item = "尺  寸";
					break;
				case 5:
					item = "包  裝";
					break;
				case 6:
					item = "過電壓本批≥60%";
					break;
				case 7:
					item = "過電壓累計≥80%";
					break;
				default:
					break;
			}

			return item;
		}
	}
}

